-- GENERATED SPELL FOR [Terokk] --


function spell0_21838(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21838', 612, 1)
end

function spell1_21838(pUnit, Event) --@Divine Shield,Self--
pUnit:FullCastSpellOnTarget(40733,pUnit)
pUnit:RegisterEvent('Sorts_21838', 669, 1)
end

function spell2_21838(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(28747,pUnit)
pUnit:RegisterEvent('Sorts_21838', 670, 1)
end

function spell3_21838(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(40721,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21838', 1500, 1)
end

function spell4_21838(pUnit, Event) --@Will of the Arakkoa God,Self--
pUnit:FullCastSpellOnTarget(40722,pUnit)
pUnit:RegisterEvent('Sorts_21838', 10325, 1)
end

function Sorts_21838(pUnit, Event)
local choix_sorts_21838 = math.random(0, 4)
if choix_sorts_21838 == 0 then
pUnit:RegisterEvent('spell0_21838', 1, 1)
end
if choix_sorts_21838 == 1 then
pUnit:RegisterEvent('spell1_21838', 1, 1)
end
if choix_sorts_21838 == 2 then
pUnit:RegisterEvent('spell2_21838', 1, 1)
end
if choix_sorts_21838 == 3 then
pUnit:RegisterEvent('spell3_21838', 1, 1)
end
if choix_sorts_21838 == 4 then
pUnit:RegisterEvent('spell4_21838', 1, 1)
end
end

function mob21838_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21838', math.random(1500, 3000), 1)
end

function mob21838_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21838_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21838_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21838, 1, 'mob21838_Action')
RegisterUnitEvent(21838, 2, 'mob21838_Leave')
RegisterUnitEvent(21838, 3, 'mob21838_Kill')
RegisterUnitEvent(21838, 4, 'mob21838_Die')
